<template>
  <div style="margin-top: 5px;">
    <div v-for="(item,index) in tableData" :key="index" @click="goVisit(item)">
      <el-card shadow="never" class="box-card">
        <el-descriptions :column="1">
          <el-descriptions-item label="走访时间">{{item.v_time}}</el-descriptions-item>
          <el-descriptions-item label="公司名称">{{item.company_name}}</el-descriptions-item>
          <el-descriptions-item label="走访人">{{item.work_name}}</el-descriptions-item>
          <el-descriptions-item v-if="item.so_id_name" label="解决人">{{item.so_id_name}}</el-descriptions-item>
        </el-descriptions>
      </el-card>
    </div>

  </div>
</template>

<script>
export default {
  props: {
    type: {
      type: Number,
      default: 1
    },
    tableData:{
      type: Array,
      default: () => []
    }
  },
  components: {},
  data() {
    return {
    };
  },
  mounted() {
    
  },
  methods: {
    goVisit(row) {
      // console.log(row,'asddasads')

        this.$router.push(
        {
          path: '/web/small/workVisit',
          query: {
            id: row.id,
            demand_id: this.type != 1 ?row.demand_id : '',
          }
        }
      )
    }
  },
};
</script>

<style lang="less" scoped>
.box-card {
  margin: 0px 0;
  border: 0px;
  z-index: 9;
  // margin-bottom: 10px;
  border-bottom: 1px solid #ebeef5;
}

.box-card:hover {
  z-index: 999;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1);
}

@media (max-width:750px) {}
</style>